Page({
    data:{
        title:"薛之谦",
        time:"2006-06-09",
        singer:"薛之谦",
        url:"http://p2.music.126.net/5oKhwXggLg5KWNtb6jiymg==/109951168378543609.jpg?param=177y177",
        list:[
            {
                id:169241,
                videoSrc:"http://link.hhtjim.com/163/169241.mp3",
                songname:"王子归来",
                name:"薛之谦",
            },
            {
                id:169243,
                videoSrc:"http://link.hhtjim.com/163/169243.mp3",
                songname:"认真的雪",
                name:"薛之谦",
            },
            {
                id:169245,
                videoSrc:"http://link.hhtjim.com/163/169245.mp3",
                songname:"红尘女子",
                name:"薛之谦",
            },
            {
                id:169247,
                videoSrc:"http://link.hhtjim.com/163/169247.mp3",
                songname:"爱不走",
                name:"薛之谦",
            },
            {
                id:169249,
                videoSrc:"http://link.hhtjim.com/163/169249.mp3",
                songname:"快乐帮",
                name:"薛之谦",
            },
            {
                id:169251,
                videoSrc:"http://link.hhtjim.com/163/169251.mp3",
                songname:"我的Show",
                name:"薛之谦 / 君君",
            },
           
            {
                id:169253,
                videoSrc:"http://link.hhtjim.com/163/169253.mp3",
                songname:"黄色枫叶",
                name:"薛之谦",
            },
            {
                id:169255,
                videoSrc:"http://link.hhtjim.com/163/169255.mp3",
                songname:"钗头凤",
                name:"",
            },
            {
                id:169257,
                videoSrc:"http://link.hhtjim.com/163/169257.mp3",
                songname:"MEMORY",
                name:"薛之谦",
            },
            {
                id:169259,
                videoSrc:"http://link.hhtjim.com/163/169259.mp3",
                songname:"我的Show(伴奏)",
                name:"薛之谦",
            },
        ]
    },
    tomusic(event) {
        const item = event.currentTarget.dataset.item; // 获取当前点击的数据项
        const { id, videoSrc,songname,name } = item; // 从数据项中解构出
        const { list,url }=this.data
        wx.navigateTo({
            url: `/pages/music/music?id=${id}&videoSrc=${encodeURIComponent(videoSrc)}&songname=${songname}&name=${name}&url=${encodeURIComponent(url)}&list=${encodeURIComponent(JSON.stringify(list))}`,
          });
    }
})